package org.ymx.myStack;

/**
 * @author 17122
 */
public class MyStack<E> {

    private Integer size;

    private final Integer DEFAULT_SIZE = 10;

    private E[] items;

    public MyStack() {
        doClean();
    }

    public MyStack(int size) {
        this.items = (E[]) new Object[size];
    }


    private void doClean() {
        items = (E[]) new Object[DEFAULT_SIZE];
    }

    public int size() {
        return this.size;
    }


}
